<?php
namespace app\yiluqianxing\home;

use think\Controller;
use think\Db;
use think\Request;
//点数相关
class Xiaochengxugoods extends Controller{

    //获取商品详情
    function goodsinf($goodid,$js=true){
        $data=Db::table('dp_ylqx_goods')
            ->where('id',$goodid)
            ->find();
        $data['imgpath']=Db::table('dp_admin_attachment')
            ->where('id',$data['img'])
            ->value('path');
        if ($js){
            echo json_encode($data);
        }else{
            return $data;
        }
    }

}